<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
    <style type="text/css">

        /* tooltip */
        #tooltip{
            position:absolute;
            border:1px solid #ccc;
            background:#333;
            padding:2px;
            display:none;
            color:#fff;
        }
        .layui-elem-field {
            margin-bottom: 0px;
            padding: 0;
            border-width: 2px;
            border-style: solid;
            border: none;
            margin: 1px;
        }
        .table-title{
            border: none;
        }
        .table-content {
             table-layout: fixed;
             word-break: break-all;
             word-wrap: break-word;
             width: 100%;
         }
        .cal-item {
            position: relative;
        }
        .cal-item-number {
            position: absolute;
            width: 100%;
            height: 100%;
            font-size: 30px;
            top: 0;
            left: 0;
            line-height: 100%;
            color: rgba(0, 150, 136,0.2);
            text-shadow: #009688 3px 3px 1px;
            display: flex;
            align-items: center;
            text-align: center;
            justify-content: center;
            pointer-events: none;
        }
        .cal-item-text {
            width: 100%;
            height: 100px;
            overflow-y: auto;
        }
        .cal-item-text-content {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            border-radius: 6px;
            padding: 3px 8px;
            margin-bottom: 4px;
        }
        .red {
            background: #ffccc7;
        }
        .green {
            background: #b7eb8f;
        }
        .blue {
            background: #91d5ff;
        }
        .yellow {
            background: #ffe58f;
        }
    </style>
</head>
<body style="padding:10px;">
<div style="position: absolute;z-index: 2;">
    <form class="layui-form serch" action="{:url('admin/working/detail')}" method="get">
        <div class="layui-form-item" style="float: left;">
            <div class="layui-input-inline">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" id="date" placeholder="yyyy-MM" name="date" value="{$date}">
                    </div>
                </div>
            </div>
            <div class="layui-input-inline">
                <div class="layui-inline">
                    <select name="person_id" lay-search="">
                        <option value="">人员</option>
                        {volist name="personList" id="role"}
                        <option value="{$role.person_id}"{notempty name="$person_id"}{eq name="$person_id" value="$role.person_id"} selected=""{/eq}{/notempty}>{$role.person_name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="serch">查询</button>
        </div>
    </form>
</div>
<div class="tplay-body-div" style="overflow: scroll;margin-top: 40px">

    <table class="layui-table table-content" lay-size="sm">
        <thead>
        <tr>
            <th width="100%" colspan="7" text-align="center"> {notempty name="dates"}{$dates} {/notempty} {notempty name="personInfo"}{$personInfo.person_name} {/notempty}</th>
        </tr>
        </thead>

        <thead>
        <tr  style="background: #009688; color: #ffffff;">
            <th style="text-align: center;"><strong>日</strong></th>
            <th style="text-align: center;"><strong>一</strong></th>
            <th style="text-align: center;"><strong>二</strong></th>
            <th style="text-align: center;"><strong>三</strong></th>
            <th style="text-align: center;"><strong>四</strong></th>
            <th style="text-align: center;"><strong>五</strong></th>
            <th style="text-align: center;"><strong>六</strong></th>
        </tr>
        </thead>
        <tbody>
        {volist name="info" id="in"}
        <tr height="120">
            {volist name="in", id="li"}
                <td valign="top" class="cal-item">
                    <div class="cal-item-number">{notempty name="li.num"} {$li.num}{/notempty}</div>
                    <div class="cal-item-text">
                        {volist name="li.task_list" id="tl"}
                        <div class="cal-item-text-content {$taskStatusColorMap[$tl.task_status]}">
                            <a href="{:url('/admin/task/personindex/',['project_id'=>$tl.project_id])}"> pid-{$tl.project_id} {$tl.task_name}</a>
                        </div>
                        {/volist}
                    </div>
                </td>
            {/volist}


        </tr>
        {/volist}
        </tbody>
    </table>
    {include file="public/foot"}

    <script type="text/javascript">

        $('.delete').click(function(){
            var id = $(this).attr('id');
            layer.confirm('确定要删除?', function(index) {
                $.ajax({
                    url:"{:url('admin/admin/delete')}",
                    data:{id:id},
                    success:function(res) {
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                location.href = res.url;
                            },1500)
                        }
                    }
                })
            })
        })
    </script>
    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            //年选择器
            laydate.render({
                elem: '#test2'
                ,type: 'year'
            });
            laydate.render({
                trigger: 'click',
                elem: '#date',
                type: 'month',
                showBottom: false,
                change: function(value) {
                    $('#date').val(value);
                    if($('#date').length) {
                        $('#layui-laydate3').remove()
                    }
                }
            });
        });
    </script>
</div>
</body>
</html>
